<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="/WEB-INF/page-base.tld" prefix="p"%>
<!DOCTYPE html>
<HTML>
  <head>
	<%@ include file="/platform/style.jsp"%>
	<script src="<%=path %>/util/js/combox.js"></script>
	<script src='<%=path %>/util/js/ui.core.js' type='text/javascript'></script>
	<link href='<%=path %>/util/js/dtree/skin/ui.dynatree.css' rel='stylesheet' type='text/css'>
	<script src='<%=path %>/util/js/dtree/jquery.dynatree.js' type='text/javascript'></script>

<script>
function rank_addRank(){
	var str=ctx+"/platform/rank/RankPage.page?actions=addShow";
	window.parent.$w.openDialog({url:str,title:'添加权限',w:430,h:470,afterClose:function(){
		if(window.parent.$w.listFlesh)
			$w.execForm();
	}});
}
function rank_updateRank(gid){
	var str=ctx+"/platform/rank/RankPage.page?actions=updateShow&primaryKey_="+gid;
	window.parent.$w.openDialog({url:str,title:'修改权限',w:430,h:470,afterClose:function(){
		if(window.parent.$w.listFlesh)
			$w.execForm();
	}});
}
function rank_del(){
	window.parent.$w.confirmMsg("确定删除？", function(r){
	if(r){
		var mform=$w.currForm();
		mform[0].actions.value="del";
		$w.execForm();
		}
	});
}
</script>
<body class="easyui-layout">
<div data-options="region:'center',border:false">
<form action="/platform/rank/RankPage.page" method="post">
<p:hidden bind="actions"/>
<p:hidden bind="pageNum"/>
<p:hidden bind="pageSize_"/>
<div class="easyui-panel ui-queryBar" border="false" data-options="doSize:false">
	<table cellpadding="0" cellspacing="0" style="margin-top:5px">
		<tr>
			<td>&nbsp;权限名称：</td><td><p:text bind="rankName"/></td>
			<td>
				&nbsp<a href="#" class="easyui-linkbutton" iconCls="icon_search" onclick="$w.execForm()">查询</a>
			</td>
		</tr>
		</tr>
	</table>
</div>
<div class="easyui-panel ui-toolBar" border="false" data-options="doSize:false">
	<a href="#" class="easyui-linkbutton" iconCls="icon_add" plain="true" onclick="rank_addRank()">添加</a>
	<a href="#" class="easyui-linkbutton" iconCls="icon_del" plain="true" onclick="rank_del()">删除</a>
</div>
<div class="ui_line" style="margin-top:10px"></div>
<table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:true,
																					pageNum:<p:write bind="pageNum"/>,
																					pageSize:<p:write bind="pageSize_"/>,
																					total:<p:write bind="pagination.totalCount"/>">
	<thead>
		<tr class="ui_th">
			<td width="35" align="center"><input type="checkbox"onclick="$selAllTbBoxs(this)"></td>
			<td width="50" align="center">编号</td>
			<td>权限名称</td>
			<td width="40%">权限描述</td>
			<td width="40" align="center">修改</td>
		</tr>
	</thead>
	<tbody>
	<p:iterate id="rank" bind="resultList_" indexId="num">
		<tr class="ui_td">
			<td align="center"><input type="checkbox" name="primaryKey_" value="<p:write bind="#rank.rankid"/>"></td>
			<td align="center"><%=num+1 %></td>
			<td><p:write bind="#rank.rankname"/></td>
			<td><p:write bind="#rank.rankdesc"/></td>
			<td align="center"><a href="#" onclick="rank_updateRank('<p:write bind="#rank.rankid"/>')" class="data_edit" title="修改"></a></td>
		</tr>
	</p:iterate>
	</tbody>
</table>
</form>
</div>
</body>
</HTML>